#!/usr/local/bin/python

# example usage - ./test.py *.wav or python test.py *.wav
from pycdp import *

if __name__ == "__main__":  # python convention, but i think you can leave it out...
    mono = cdp.housekeep.chans(4)
    norm = cdp.modify.loudness(3)



    cut = cdp.sfedit.cut(1)
    cut.start = 0
    cut.end = 20

    reform = cdp.distort.reform(4)

    distreport = cdp.distort.replim()
    distreport.c = 10
    distreport.multiplier = 10
    distreport.f = 3000

    distpitch = cdp.distort.pitch()
    distpitch.c = 128
    distpitch.octvary = 4


    rev = cdp.modify.revecho(3)

    chain = []
    chain.append(cut)
    chain.append(rev)
    chain.append(mono)
    chain.append(reform)
    chain.append(distreport)
    chain.append(reform)
    chain.append(distpitch)
    chain.append(norm)

    output_files = cdp.run_chain(chain, sys.argv[1:], False)

    print(output_files) # debug!
